﻿package com.wxsoft.business.physic.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wxsoft.business.model.easyui.PageHelper;

import com.wxsoft.business.physic.dao.IPsPhysicPriceModifyDetailDao;
import com.wxsoft.business.physic.service.IPsPhysicPriceModifyDetailService;
import com.wxsoft.business.physic.pojo.PsPhysicPriceModifyDetail;

@Service("psPhysicPriceModifyDetailService")
public class PsPhysicPriceModifyDetailServiceImpl implements IPsPhysicPriceModifyDetailService  {
	@Resource
	private IPsPhysicPriceModifyDetailDao dao;
	
	
	public long findCount(PsPhysicPriceModifyDetail psPhysicPriceModifyDetail) {
		return dao.findCount(psPhysicPriceModifyDetail);
	}
	
	public List<PsPhysicPriceModifyDetail> findAll(PageHelper page,PsPhysicPriceModifyDetail psPhysicPriceModifyDetail) {
        List<PsPhysicPriceModifyDetail> r = dao.findAll(page,psPhysicPriceModifyDetail);
		return r;
	}
	@Transactional
	public String add(PsPhysicPriceModifyDetail psPhysicPriceModifyDetail) {
		int r = this.dao.insert(psPhysicPriceModifyDetail);
		if(r==1){
			return "操作成功!";
		}
		return "操作失败!";
	}
	@Transactional
	public String modify(PsPhysicPriceModifyDetail psPhysicPriceModifyDetail) {
		int r = this.dao.modify(psPhysicPriceModifyDetail);
		if(r==1){
			return "操作成功!";
		}
		return "操作失败!";
	}
	@Transactional
	public String delete(PsPhysicPriceModifyDetail psPhysicPriceModifyDetail) {
		int r = this.dao.delete(psPhysicPriceModifyDetail);
		if(r==1){
			return "操作成功!";
		}
		return "操作失败!";
	}
	
}
